<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>第二个jq</title>
		<script src="jquery-3.4.1.min.js"></script>
		<script>
		$(function(){
			var d3=$("#d7 li").get(2);
			//d3也是dom元素
			d3.style.color="red";
			 //$("#d7 li").css("font-size","40px");
			 $("#d7 li").each(function(i,d){
				 //this
				 //d是dom元素
				 //d.style.fontSize=((i+1)*10)+"px";
				 $(d).css("font-size",((i+1)*10));
			 }); 
			 //$.each($("#d7 li"),function)
			 //事件绑定机制
			 $("li").click(function(){
				alert($(this).text());
			 });
		});
		</script>
	</head>
	<body>
		<div id="d7">
			<ul type="square">
				<li>apple</li>
				<li>banana</li>
				<li>grape</li>
				<li>pear</li>
				<li>water-melon</li>
			</ul>
		</div>
	</body>
</html>
